package cn.iotab.iotkit.transport.api.common.queue;

import cn.iotab.iotkit.queue.queue.QueueConsumer;
import cn.iotab.iotkit.queue.queue.QueueProducer;
import cn.iotab.iotkit.queue.rpc.QueueRequestTemplate;
import cn.iotab.iotkit.queue.rpc.QueueResponseTemplate;
import cn.iotab.iotkit.transport.api.common.message.JsonQueueMsg;
import cn.iotab.iotkit.transport.api.common.message.RpcRequestMessage;
import cn.iotab.iotkit.transport.api.common.message.RpcResponseMessage;
import cn.iotab.iotkit.transport.api.common.message.ToServerMessage;
import cn.iotab.iotkit.transport.api.common.message.ToTransportMessage;

public interface TransportQueueFactory {

    QueueRequestTemplate<JsonQueueMsg<RpcRequestMessage>, JsonQueueMsg<RpcResponseMessage>> createTransportApiRequestTemplate(String rpcChannel);

    QueueResponseTemplate<JsonQueueMsg<RpcRequestMessage>, JsonQueueMsg<RpcResponseMessage>> createTransportApiResponseTemplate(String rpcChannel);

    QueueProducer<JsonQueueMsg<ToServerMessage>> createToServerMsgProducer(String topic);

    QueueProducer<JsonQueueMsg<ToTransportMessage>> createToTransportMsgProducer(String topic);

    QueueConsumer<JsonQueueMsg<ToTransportMessage>> createTransportNotificationsConsumer(String topic, String group);

    QueueConsumer<JsonQueueMsg<ToServerMessage>> createServerNotificationsConsumer(String topic, String group);

}
